package com.hk.yajin.function.members.activity;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hk.developmentlib.utills.DeviceUtils;
import com.hk.developmentlib.utills.UiUtil;
import com.hk.yajin.R;
import com.hk.yajin.base.BaseActivity;
import com.hk.yajin.utills.AppUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

import static com.hk.yajin.R.id.iv_logo;
import static com.hk.yajin.R.id.tv_agreement;

public class AboutUsActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
     @BindView(iv_logo)
    ImageView ivLogo;
    @BindView(R.id.tv_version)
    TextView tvVersion;
    @BindView(R.id.tv_agreement)
    TextView tvAgreement;
    @BindView(R.id.tv_score)
    TextView tvScore;
    @BindView(R.id.activity_about_us)
    LinearLayout activityAboutUs;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about_us);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        initToolBar(R.string.user_about);
        ivLogo.getLayoutParams().width= UiUtil.getScreenWidth()*214/720;
        ivLogo.getLayoutParams().height= UiUtil.getScreenWidth()*214/720;
        tvAgreement.getLayoutParams().width= UiUtil.getScreenWidth()*500/720;
        tvScore.getLayoutParams().width= UiUtil.getScreenWidth()*500/720;
        tvVersion.setText("当前版本"+ DeviceUtils.getVersionCode(this));
    }



    @OnClick({R.id.tv_agreement, R.id.tv_score})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_agreement:
                startActivity(ContractActivity.class);
                break;
            case R.id.tv_score:
                break;
        }
    }
}
